<template>
  <div class="content-page-app">
    <TestPopup v-if="store.isShow"></TestPopup>
    <div v-else class="btn" @click="handleOpenOrClose">打开或者关闭</div>
  </div>
</template>
<script setup>
import TestPopup from './components/TestPopup.vue'
import { useCounterStore } from './store/counter' // 引入pinia 数据
const store = useCounterStore() // 获取pinia数据
const handleOpenOrClose = () => {
  store.showOrHide()
}
</script>
<style scoped lang="less">
.content-page-app {
  width: 100vw;
  height: 100vh;
}
.btn {
  position: fixed;
  right: 0px;
  top: 32vh;
  padding: 8px;
  background-color: #f00;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  cursor: pointer;
}
</style>
